package design.patterns.structural.decorator;

/**
 * @author gjx
 * @version v1.0
 * @Description
 * @date 2019/4/4 17:00
 */
public class Milk extends SeasoningDecorator {
    private Coffee coffee;

    public Milk(Coffee coffee) {
        this.coffee = coffee;
    }

    @Override
    public String getSeasoning() {
        return coffee.getSeasoning()+"加牛奶";
    }

    @Override
    public double getPrice() {
        return coffee.getPrice() + 10;
    }
}
